package com.create.myworld.objects;

import com.create.myworld.util.TimeUtil;

import java.util.UUID;

/**
 * @author zcw
 * 万物基类
 */
public class Substance {

    /**
     * 创建时间
     */
    protected Long startTime;

    /**
     * ID
     */
    protected String id;

    /**
     * 物体名称
     */
    protected String name;


    public Long getStartTime() {
        return startTime;
    }

    protected void setStartTime(Long startTime) {
        this.startTime = startTime;
    }

    public String getId() {
        return id;
    }

    protected void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    protected void setName(String name) {
        this.name = name;
    }

    protected Substance() {
        setStartTime(TimeUtil.getSeconds());
        setId(UUID.randomUUID().toString().replace("-", "").toLowerCase());
    }
}
